<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>事件的拖拽</title>
</head>
<style>
    #box1 {
        width: 100px;
        height: 100px;
        background-color: red;
        position: absolute;
    }

    #box2 {
        width: 100px;
        height: 100px;
        background-color:yellow;
        position: absolute;
        left: 200px;
        top: 200px;
    }
</style>
<script src="function.js" type="text/javascript"></script>

<body>
    <div id="box1"></div>
    <div id ="box2"></div>
</body>

</html>